package org.springblade.modules.platform.vo;

import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.NullSerializer;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

@Data
public class DataDetailsVO {

    @ApiModelProperty(value = "一侧量集合")
    private List<MeasuringPointTableVO> measuringPointTableVOS;
    @ApiModelProperty(value = "工程量")
    private EngineerValueTableVO engineerValueTableVO;
    @ApiModelProperty(value = "物理量")
    private PhysicalValueTableVO physicalValueTableVO;


    @NoArgsConstructor
    @Data
    public static class PhysicalValueTableVO {
        @TableField("zX")
        @ApiModelProperty(value = "正向光束的X方向相对变形量")
        @JsonSerialize(nullsUsing = NullSerializer.class)
        private Double zX;

        /**
         * 正向光束的Z方向相对变形量
         */
        @TableField("zZ")
        @ApiModelProperty(value = "正向光束的Z方向相对变形量")
        @JsonSerialize(nullsUsing = NullSerializer.class)
        private Double zZ;

        /**
         * 逆向光束的X方向相对变形量
         */
        @TableField("nX")
        @ApiModelProperty(value = "逆向光束的X方向相对变形量")
        @JsonSerialize(nullsUsing = NullSerializer.class)
        private Double nX;

        /**
         * 逆向光束的Z方向相对变形量
         */
        @TableField("nZ")
        @ApiModelProperty(value = "逆向光束的Z方向相对变形量")
        @JsonSerialize(nullsUsing = NullSerializer.class)
        private Double nZ;

        /**
         * 铟钢管的相对变形量
         */
        @ApiModelProperty(value = "铟钢管的相对变形量")
        @JsonSerialize(nullsUsing = NullSerializer.class)
        private Double deltaY;


        @ApiModelProperty(value = "倾角Y")
        @JsonSerialize(nullsUsing = NullSerializer.class)
        private Double dipY;


        @ApiModelProperty(value = "倾角X")
        @JsonSerialize(nullsUsing = NullSerializer.class)
        private Double dipX;
    }

    @NoArgsConstructor
    @Data
    public static class EngineerValueTableVO {
        @ApiModelProperty(value = "x")
        @JsonSerialize(nullsUsing = NullSerializer.class)
        private Double x;

        /**
         * Y方向绝对变形量
         */
        @ApiModelProperty(value = "y")
        @JsonSerialize(nullsUsing = NullSerializer.class)
        private Double y;

        @ApiModelProperty(value = "Z方向绝对变形量")
        @JsonSerialize(nullsUsing = NullSerializer.class)
        private Double z;

        /**
         * 绕X方向的旋转角
         */
        @ApiModelProperty(value = "绕X方向的旋转角")
        @JsonSerialize(nullsUsing = NullSerializer.class)
        private Double alpha;

        /**
         * 绕Y方向的旋转角
         */
        @ApiModelProperty(value = "绕Y方向的旋转角")
        @JsonSerialize(nullsUsing = NullSerializer.class)
        private Double beta;

        /**
         * 绕Z轴的旋转角
         */
        @ApiModelProperty(value = "绕Z轴的旋转角")
        @JsonSerialize(nullsUsing = NullSerializer.class)
        private Double gama;

    }


    @NoArgsConstructor
    @Data
    public static class MeasuringPointTableVO {

        @ApiModelProperty(value = "设备ID")
        private String deviceId;

        /**
         * 设备名称
         */
        @ApiModelProperty(value = "设备名称")
        private String deviceName;

        /**
         * 数据类型
         */
        @ApiModelProperty(value = "数据类型")
        private String propertieId;


        /**
         * 数据类型名称
         */
        @ApiModelProperty(value = "数据类型名称")
        private String propertieName;



        /**
         * 一次量数据
         */
        @ApiModelProperty(value = "一次量数据")
        @JsonSerialize(nullsUsing = NullSerializer.class)
        private Double onceValue;

    }
}
